package nc.itf.cad.pub;

import nc.bs.trade.business.HYPubBO;
import nc.vo.cad.testcorprange.TestCorpRangeVO;
import nc.vo.pub.BusinessException;

public class TestCorpRange {
	public String getTestCorpRange(String pk_corp) throws BusinessException {
		String str = null;
		HYPubBO bo = new HYPubBO();
		TestCorpRangeVO[] result = (TestCorpRangeVO[]) bo
				.queryAll(TestCorpRangeVO.class);
		if (result == null || result.length == 0) {
			return str;
		}
		for (TestCorpRangeVO vo : result) {
			String corp = vo.getPk_corp();
			if (corp != null && corp.length() > 0) {
				if (corp.contains(pk_corp)) {
					str = corp;
					break;
				}
			}
		}
		return str;
	}
}